/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package dnbW.uiW.queryW.modelW;

import java.util.LinkedList;
import java.util.Collection;

/**
 *
 * @author erwin
 */
public class ConditionCluster {

    //private String ClusterPathExp = "";
    private LinkedList<ConditionNodeLeafObject> conditions = new LinkedList<ConditionNodeLeafObject>();

    public ConditionCluster() {
    }

//    public void setClusterPathExp(String pathexp) {
//        ClusterPathExp = pathexp;
//    }
//
//    public String getClusterPathExp() {
//        return ClusterPathExp;
//    }
//
    public boolean contains(ConditionNodeLeafObject node)
    {
        if (conditions.contains(node))
        {
            return true;
        }
        return false;
    }
    
    public void addConditionNodeIntoCluster(ConditionNodeLeafObject node) {
        conditions.add(node);
    }
    
    public ConditionNodeLeafObject getCondition(int index)
    {
        return ((ConditionNodeLeafObject)conditions.get(index));
    }

    public Collection<ConditionNodeLeafObject> getConditions() {
        return this.conditions;
    }
    
    public int size()
    {
        return conditions.size();
    }

    public boolean isEmpty() {
        return this.conditions.isEmpty();
    }
}
